package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.JournalismMapper;
import com.jobpass.common.model.Journalism;
import com.jobpass.common.service.JournalismService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class JournalismServiceImpl extends ServiceImpl<JournalismMapper, Journalism> implements JournalismService {
    @Resource
    private JournalismMapper journalismMapper;
    @Override
    public List<Journalism> FindAllJournalism() {
        return journalismMapper.selectList(null);
    }

    @Override
    public Journalism FindJournalismById(Long id) {
        return journalismMapper.selectById(id);
    }

    @Override
    public int DeleteJournalismById(Long id) {
        return journalismMapper.deleteById(id);
    }

    @Override
    public int UpdateJournalismById(Journalism journalism) {
        return journalismMapper.updateById(journalism);
    }

    @Override
    public int SavaJournalism(Journalism journalism) {
        return journalismMapper.insert(journalism);
    }
}
